package com.eatme.quartz.misfire;

import com.eatme.web.WebCaseApplication;
import org.quartz.Job;
import org.quartz.JobExecutionContext;
import org.quartz.JobExecutionException;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;

import java.time.LocalTime;

public class CronTriggerMisfireJobCase implements Job {

    private static final Logger LOG = LoggerFactory.getLogger(CronTriggerMisfireJobCase.class);

    private String msg;

    public void setMsg(String msg) {
        this.msg = msg;
    }

    @Override
    public void execute(JobExecutionContext jobExecutionContext) throws JobExecutionException {
        LocalTime now = LocalTime.now();
        LOG.info("时间: {},msg: {}",now.toString(),msg);
        try {
            Thread.sleep(1000);
        } catch (InterruptedException e) {
            e.printStackTrace();
        }


    }
}
